#include("../../_common/_header.html")

<div class="layui-fluid">

<!-- 商品基本信息 -->
	<div class="layui-row">
		<div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
		</div>
		<div class="layui-col-xs6 layui-col-sm6 layui-col-md4">
		</div>
	</div>


<!-- 商品布局 -->
#for(place : goods.goodsImagePlaceList)
	#if(place.code=="fill_row") ###铺满一行
	<div class="layui-row">
		#for(image : goods.goodsImageList)
		#if(image.placeCode == place.code && image.placeId == place.id)
		<div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
			<img alt="铺满一行"  src="#(image.originalImg)">
		</div>
		#end
		#end
	</div>
	#end

	#if(place.code=="2imgs") ###一行2图片
	<div class="layui-row">
		#for(image : goods.goodsImageList)
		#if(image.placeCode == place.code && image.placeId == place.id)
		<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
			<img alt="一行2图片"  src="#(image.originalImg)">
		</div>
		#end
		#end
	</div>
	#end

	#if(place.code=="2x2imgs") ###2行4图片
	<div class="layui-row">
		#for(image : goods.goodsImageList)
		#if(image.placeCode == place.code && image.placeId == place.id)
		<div class="layui-col-xs6 layui-col-sm6 layui-col-md6">
			<img alt="2行4图片"  src="#(image.originalImg)">
		</div>
		#end
		#end
	</div>
	#end

	#if(place.code=="carousel") ###轮播（最多8图）
	<div class="layui-row">
		<div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
			<div class="layui-carousel" id="test1">
				<div carousel-item>
					#for(image : goods.goodsImageList)
					#if(image.placeCode == place.code && image.placeId == place.id)
					<div>
						<img alt="轮播" src="#(image.originalImg)">
					</div>
					#end
					#end
				</div>
			</div>
		</div>
	</div>
	#end

	#if(place.code=="goods_content") ###商品详情（不关联图片）
	<div class="layui-row">
		<div class="layui-col-xs12 layui-col-sm12 layui-col-md12">
		#(goods.content)
		</div>
	</div>
	#end
#end



<!-- 关联商品 -->




</div>

<script>
layui.use('carousel', function(){
	var carousel = layui.carousel;
	//建造实例
	carousel.render({
		elem: 'test1',
		width: '100%', //设置容器宽度
		arrow: 'always' //始终显示箭头
		//,anim: 'updown' //切换动画方式
	});
});

#include("../../_common/_footer.html")
